import Vue from 'vue'
import Router from 'vue-router'
//懒加载
const home=()=>import('../pages/1/1')
const fenlei=()=>import('../pages/2/2')
const shop=()=>import('../pages/3/3')
const mine=()=>import('../pages/4/4')


Vue.use(Router)

export default new Router({
  //设置映射关系
  routes: [
    {
      path: '/',
      redirect:'/home'
    },
    {
      path:'/home',
      component:home
    },
    {
      path:'/fenlei',
      component:fenlei
    },
    {
      path:'/shop',
      component:shop
    },
    {
      path:'/mine',
      component:mine
    }
  ]
})
